#include <iostream>
#include<cstdio>
using namespace std;
int main(){
    double a,b,c,d,grade;
    cin>>a>>b>>c>>d;
    grade=a*0.2+b*0.1+c*0.2+d*0.5;
    printf("%.1lf",grade);
    return 0;
}
